import request from '@/utils/request';
import { AxiosPromise } from 'axios';

// 查询推广链接类型列表
export function getListLinkType(): AxiosPromise<any> {
  return request({
    url: '/oce/config/listLinkType',
    method: 'get'
  });
}

// 查询推广链接类型列表
export function getListAppType(): AxiosPromise<any> {
  return request({
    url: '/oce/config/listAppType',
    method: 'get'
  });
}

//获取部门列表
export function getListDepartment(params: { status: '0' | '1' }): AxiosPromise<any> {
  return request({
    url: `/system/dept/list?status=${params.status}`,
    method: 'get'
  });
}

// 获取推广链接-广告主关联详细信息
export function advertiserReferralRelation(id: string): AxiosPromise<any> {
  return request({
    url: `/oce/advertiserReferralRelation/queryAdvertiserInfo`,
    method: 'get',
    params: { thirdAdvertiserId: id }
  });
}

// 校正充值
export function syncOrder(data): AxiosPromise<any> {
  return request({
    url: `/oce/advertiserEverydayCost/syncOrder`,
    method: 'get',
    params: data
  });
}

// 校正消耗
export function syncCost(data): AxiosPromise<any> {
  return request({
    url: `/oce/advertiserEverydayCost/syncCost`,
    method: 'get',
    params: data
  });
}
